#ifndef						IA_HH_
# define					IA_HH_

# include					<map>
# include					<utility>
# include					"APlayer.hpp"
# include					"Square.hpp"
# include					"Arbitre.hpp"

class						Goban;

class 						IA : public APlayer
{
private:					
	//						Attributes
	Goban					&_goban;
	Arbitre 				&_arbitre;
	short int				_depth;
	std::map<int, Square*>  &_squareMap;
	bool					AIPlayer;
	std::map<int, int>		playAround;

public:
	//						Ctor-Dtor
	IA(Goban &goban, std::string const &stonePath, Arbitre &arbitre, short int depth);
	virtual ~IA();
	
	//						Functions
	void					switchPlayer();
	void					putStone(int key);
	void					removeStone(int key);
	Goban					*simulate(Goban *prev_map, int &pos);
	int						getScore(int &pos, Box *map);
	int						minMaxRoot();
	int						minMaxTree(Goban *map, short int depth, int local_score);
	int						doNotPlayLikeAMartens(int pos);
	int						getDeadStone() const;

	//						Friend Fonctions
	//friend void				Map::checkCoordsValidity(int key);
};

#endif